import request from '@/utils/request'

// 查询调度日志列表
export function getDispatchLogList(params) {
  return request({
    url: '/dispatch/dispatch/dispatchScheduleLog/list',
    method: 'get',
    params
  })
}

// 获取调度日志详细信息
export function getDispatchLogDetail(logId) {
  return request({
    url: `/dispatch/dispatch/dispatchScheduleLog/${logId}`,
    method: 'get'
  })
}

// 新增调度日志
export function addDispatchLog(data) {
  return request({
    url: '/dispatch/dispatch/dispatchScheduleLog',
    method: 'post',
    data
  })
}

// 删除调度日志
export function deleteDispatchLog(logIds) {
  return request({
    url: `/dispatch/dispatch/dispatchScheduleLog/${logIds}`,
    method: 'delete'
  })
}

// 添加到方案库
export function addToSolutionLibrary(data) {
  return request({
    url: '/dispatch/dispatch/dispatchScheduleLog/addToLibrary',
    method: 'post',
    data
  })
}

// 获取日志分类
export function getLogCategory() {
  return request({
    url: '/dispatch/dispatch/dispatchScheduleLog/category',
    method: 'get'
  })
}